/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sim_test;

import javax.swing.*;
import java.awt.Dimension;
import java.awt.*;

/**
 *
 * @author Administrator
 */
public class Sim_JScrollMainGraphicsWindow extends JScrollPane{
    
        private boolean isGridVisible;
        private Sim_ControllerMain simControllerMain;
        private Sim_JLayeredPaneOverlayHandler jlayeredPane;
        
        
    public Sim_JScrollMainGraphicsWindow(Sim_ControllerMain scm, Dimension size, Dimension sizeOfComponents)
    {
        //object creation
        simControllerMain = scm;
        
        jlayeredPane = new Sim_JLayeredPaneOverlayHandler(simControllerMain, sizeOfComponents);
        
        //variable change
        setPreferredSize(size);
        
        addContent();
        
        
        
    }
    
    private void addContent()
    {
         getViewport().add( jlayeredPane);
    }
    
    public void toggleShowGrid()
    {
        jlayeredPane.toggleShowGrid();
    }
    
    public boolean getGridIsVisible()
    {
        return jlayeredPane.getGridIsVisible();
    }
    
    

}
